package com.k.base.jdk.functions.demo5;

import com.k.base.jdk.functions.demo5.model.Fei;
import com.k.base.jdk.functions.demo5.model.Gan;
import com.k.base.jdk.functions.demo5.model.Heart;

public class Test5 {
    private static void test(){
        GenSimple.create()
                .setHeart(a->a.setHeartCode("h01"))
                .setGan(a->a.setGanCode("g01"))
                .setFei(a->a.setFeiCode("f01"))
                .gen();

    }
    private static void testGen(){
        Gen g = new Gen();

        Heart heart = new Heart();
        heart.setHeartCode("genHeart01");
        g.setHeart(heart);

        Gan gan = new Gan();
        gan.setGanCode("genGan001");
        g.setGan(gan);

        Fei fei = new Fei();
        fei.setFeiCode("gen-fei001");
        g.setFei(fei);

        g.gen();
    }
    public static void main(String[] args) {
        test();
        testGen();
    }
}
